#ifndef _QtApp
#define _QtApp

#include "../Common/Card.h"
#include "../Common/Player.h"
#include "../Common/NetWorkInterface.h"
#include "../Common/Exception.h"
#include "Game.h"

#include <QApplication>
#include <iostream>
#include <sstream>
#include <string>
#include <QtGui>
#include <map>
#include <cstdio>

class QtApp : public QWidget
{
	Q_OBJECT

	public:

		QLabel *titre;
		QLabel *libelleNom[2];
		QLabel *flo;
		QTabWidget * tab;
		QLabel *libelleInformation[3];

		QGridLayout *gridLayout;
		QGridLayout *gridLayoutCardPlayer[2];
		QGridLayout *gridLayoutCardFlop;
		QtApp(QWidget *parent = 0);
		// Paramtère lors de l'éxécution de l'application
		char** argvGolbal;
		void endGame(Player &player1,Player &player2);
		QTimer *timer ;
		void printCard(Card &c,QGridLayout *gridLayout,int x, int y);
		void printCard(Card &c,QGridLayout *gridLayout,int x, int y,int row,int colmn,Qt::Alignment ali);
		void upadteInterfaceGraphicOnPlayer(Player &player);
		void updateDeliveryPreFlop();
		void updateDeliveryFlop();
		void updateDeliveryTurn();
		void updateDeliveryRiver();
		void createPage();
		string createTabHTML(string libelle,Player &player);

	public slots:
		void launch_in_main();
		void launch_in_new();
		void slotsConnexion();

	signals:
		void connexionJoueur();
};

#endif
